//
//  KCWebChatViewController.m
//  EmptyProjectTableBarViewController
//
//  Created by YannisChou on 16/3/14.
//  Copyright © 2016年 Alibaba. All rights reserved.
//

#import "KCWebChatViewController.h"

@interface KCWebChatViewController ()

@end

@implementation KCWebChatViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor redColor];
    
    // 设置视图控制器标题
    self.title = @"Chat";
    
    // 注意通过tabBarController或者parentViewController可以得到其俯视图控制器(也就是KCTabBarViewController)
    NSLog(@"%i",self.tabBarController == self.parentViewController);// 对于当前应用二者相等
    
    // 设置图标、标题(tabBarItem是显示在tabBar上的标签)
    self.tabBarItem.title = @"Web Chat"; // 注意如果这个标题不设置默认在标签页上显示视图控制器标题
    self.tabBarItem.image = [UIImage imageNamed:@"Chat_i"]; // 默认图片
    self.tabBarItem.selectedImage = [UIImage imageNamed:@"Chat_o"]; // 选中图片
    
    // 图标右上角内容
    self.tabBarItem.badgeValue = @"5";
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
